//
//  PostTypeCell.m
//  ZhuanZuBao
//
//  Created by bchy on 2020/8/31.
//  Copyright © 2020 戴伟. All rights reserved.
//

#import "PostTypeCell.h"


@interface PostTypeCell ()

@property (weak, nonatomic) IBOutlet UIImageView *iconImageView;

@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *subTitleLabel;

@end

@implementation PostTypeCell

- (void)awakeFromNib {
    [super awakeFromNib];
}

+ (instancetype)cellWithTableView:(UITableView *)tableView{
    static NSString *ID = @"PostTypeCell";
    PostTypeCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        cell = [[[NSBundle mainBundle] loadNibNamed:ID owner:self options:nil] lastObject];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    return cell;
}

-(void)setImage:(NSString *)imageName title:(NSString *)title subTitle:(NSString *)subTitle{
    _iconImageView.image = [UIImage imageNamed:imageName];
    _titleLabel.text = title;
    _subTitleLabel.text = subTitle;
}


@end
